//
//  SendResumeVC.m
//  MyProject
//
//  Created by jiaming yan on 2018/5/22.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "SendResumeVC.h"

@interface SendResumeVC ()
@property (weak, nonatomic) IBOutlet UIButton *selectButton1;
@property (weak, nonatomic) IBOutlet UIButton *selectButton2;
@property (copy, nonatomic) NSString *typeStr;
@end

@implementation SendResumeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.view.backgroundColor = kClearColor;
    [self typeButtonClick:self.selectButton1];
    
}
- (IBAction)typeButtonClick:(UIButton *)sender {
    if (sender == self.selectButton1) {
        [self.selectButton1 setImage:IMAGE(@"pop_ic_select") forState:UIControlStateNormal];
        [self.selectButton2 setImage:IMAGE(@"pop_ic_unselect") forState:UIControlStateNormal];
        self.typeStr = @"1";
    }else{
        [self.selectButton2 setImage:IMAGE(@"pop_ic_select") forState:UIControlStateNormal];
        [self.selectButton1 setImage:IMAGE(@"pop_ic_unselect") forState:UIControlStateNormal];
        self.typeStr = @"2";
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)backClick:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (IBAction)sendClick:(id)sender {
    if ([self.typeStr isEqualToString:@"1"]) {
        NSURL *url = [NSURL URLWithString:@"https://itunes.apple.com/cn/app/boss%E7%9B%B4%E8%81%98-%E6%8B%9B%E8%81%98%E6%B1%82%E8%81%8C%E6%89%BE%E5%B7%A5%E4%BD%9C%E7%A5%9E%E5%99%A8/id887314963?mt=8"];
        [[UIApplication sharedApplication] openURL:url];
    }else{
        NSURL *url = [NSURL URLWithString:@"https://itunes.apple.com/cn/app/%E6%8B%89%E5%8B%BE-%E4%BA%92%E8%81%94%E7%BD%91%E6%8B%9B%E8%81%98%E6%B1%82%E8%81%8C%E6%89%BE%E5%B7%A5%E4%BD%9C%E5%BF%85%E5%A4%87/id1069297969?mt=8"];
        [[UIApplication sharedApplication] openURL:url];
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
